Timeseries clustering

Time series clustering is to partition time series data into groups based on similarity or distance, so that time series in the same cluster are similar.

Methodology followed:

Paper: https://arxiv.org/pdf/1412.6581.pdf

Contents

  1. Load data and preprocess
  2. Initialize VRAE object
  3. Fit the model onto dataset
  4. Transform the input timeseries to encoded latent vectors
  5. Save the model to be fetched later
  6. Visualize using PCA and tSNE

Import required modules

Download dir

Hyper parameters

Load data and preprocess

Initialize VRAE object

VRAE inherits from sklearn.base.BaseEstimator and overrides fit, transform and fit_transform functions, similar to sklearn modules

Fit the model onto dataset

Plot loss

Transform the input timeseries to encoded latent vectors

Save / load the model

Reconstruction

Visualize using PCA and tSNE